from urllib.parse import urlparse
from urllib.parse import urlunparse,urljoin

#parse
result = urlparse('http://www.baidu.com/index.html;user?id=6')
print(result)

#https
result = urlparse('www.baidu.com/index.html;user?id=6',scheme="https")
print(result)

#urlunparse
# data=['http','www.baidu.com','index.html','user']
# print(urlunparse(data))

print(urljoin('http://www.baidu.com','FAQ.html'))